import Vue from 'vue'
import VueRouter from 'vue-router'
import workNoticeDetail from '@/views/work-notice-detail.vue'
import Home from '@/views/Home.vue'
import Notice from '@/views/Notice.vue'
import NoticeList from '@/views/modules/notice/list.vue'
import NoticeDetail from '@/views/modules/notice/detail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/workNoticeDetail',
    name: '工作公告',
    component: workNoticeDetail,
  },
  {
    path: '/',
    name: '首页',
    component: Home,
    redirect: '/notice'
  },
  {
    path: '/notice',
    name: '告知书',
    component: Notice,
    children: [{
      path: '/notice/list',
      component: NoticeList
    },
    {
      path: '/notice/detail',
      component: NoticeDetail
    }]
  },
]

const router = new VueRouter({
  routes,
})

export default router
